package com.ssextjs.component.grid;

public class Column {
	public int width=50;
	public String id;
	public String header;
	public int align=0; //0 - left,1-center,2-right
	public GridCellRenderer renderer=null;
	
	public Column(String c_id,String c_header) {
		this.id=c_id;
		this.header = c_header;
	}
	
	public Column(String c_id,String c_header,int c_width,int c_align) {
		this.id=c_id;
		this.header = c_header;
		this.width=c_width;
		this.align = c_align;
	}
	
	public String getId(){
		return this.id;
	}
	
	public String getHeader() {
		return this.header;
	}
	
	public Column setWidth(int w) {
		this.width=w;
		return this;
	}
	
	public int getWidth() {
		return this.width;
	}
	
	public Column setAlign(int al) {
		this.align=al;
		return this;
	}
	
	public Column setHeader(String h) {
		this.header=h;
		return this;
	}
	
	public Column setRenderer(GridCellRenderer rn) {
		this.renderer=rn;
		return this;
	}
	
	public GridCellRenderer getRenderer() {
		return this.renderer;
	}
	
	public boolean hasRenderer() {
		if (this.renderer!=null) {
			return true;
		}else{
			return false;
		}
	}
}
